package com.wanxi.arr;

public class ErWeiArrayFor {
    public static void main(String[] args) {
        double[][] array = {
                {1, 2.0, 4},
                {2},
                {2, 4}
        };
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
//            double[] temp = array[i];
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j] + " ");
                sum += array[i][j];
            }
            System.out.println();
        }
        System.out.println("和为:" + sum);
    }
}
